package com.example.activity_02;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.widget.TextView;

/**
 * Created by 居伦昶 on 2018/4/13.
 */

public class OtherActivity extends Activity {
   private TextView myTextView = null;
    @Override
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.other);
        Intent intent=getIntent();//得到intent
        String value=intent.getStringExtra("test");//获取设置的按键值
        myTextView =(TextView)findViewById(R.id.myTextView);//建立文本
        myTextView.setText(value);//设置文本内容

    }
}
